import axios from './axios'

export const getMedicalList = (params) => axios.get('/caregiver/medical/list', { params })
export const addMedical = (data) => axios.post('/caregiver/medical/addRecord', data)
// 缺失接口补充
export const getCaregiverMedicalRecords = (params) => request.get('/medical/caregiver', { params })
export const addMedicalRecord = (data) => request.post('/medical', data)
export const updateMedicalRecord = (data) => request.put('/medical', data)
export const deleteMedicalRecord = (id) => request.delete(`/medical/${id}`)
export const medicalApi = {
    list: (params) => request.get('/medical', { params }),
    add: (data) => request.post('/medical', data),
    update: (data) => request.put('/medical', data),
    delete: (id) => request.delete(`/medical/${id}`)
}